package com.dapeis.core.utils;

import java.text.DecimalFormat;
import java.util.Date;

import org.springframework.stereotype.Component;

import com.ag.core.IFreemarkerMarker;
import com.ag.utils.DateUtils;
import com.dapeis.domain.Order;

@Component("stylistTagUtils")
public class StylistTagUtil extends IFreemarkerMarker {

    
    /**
     * 订单类型
     * @param type
     * @return
     */
    public static String fromatRequirementType(Object type) {
	return RequirementConfig.getTypeName(new Integer(type.toString()));
    }
    
    
    

    /**
     * 解析金额
     * @param _price
     * @return
     */
    public static String fromatMoney(Object _price) {
	
	return DBConfigUtils.paserMoney(_price);
    }
    
    
    
    
    public static String fromatBirthday(Object brithday){
	Long birLong = new Long(brithday.toString());
	return DateUtils.format(DateUtils.YYYY_MM_DD,new Date(birLong*1000)).toString();
    }
    
    public static String fromatCityFullName(String code){
	return DBConfigUtils.getFullCityName(code);
    }
    
    
    public static String fromatImgFullPath(String imgUrl){
	return DBConfigUtils.getFullImgPath(imgUrl);
    }
}
